package com.ecar.api.service.order.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ecar.api.service.order.OrderPriceDetailService;
import com.ecar.core.order.dao.OrderPriceDetailMapper;
import com.ecar.core.order.entity.OrderLost;
import com.ecar.core.order.entity.OrderPriceDetail;

@Service
@Transactional
public class OrderPriceDetailServiceImpl implements OrderPriceDetailService {
	
	@Autowired
	private OrderPriceDetailMapper orderPriceDetailMapper;

	@Override
	public int deleteByPrimaryKey(String id) {
		return orderPriceDetailMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(OrderPriceDetail record) {
		return orderPriceDetailMapper.insert(record);
	}

	@Override
	public int insertSelective(OrderPriceDetail record) {
		return orderPriceDetailMapper.insertSelective(record);
	}

	@Override
	public OrderPriceDetail selectByPrimaryKey(String id) {
		return orderPriceDetailMapper.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKeySelective(OrderPriceDetail record) {
		return orderPriceDetailMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(OrderPriceDetail record) {
		return orderPriceDetailMapper.updateByPrimaryKey(record);
	}

	@Override
	public Double queryBlance(String driverId) {
		return orderPriceDetailMapper.queryBlance( driverId);
	}

	@Override
	public int deleteByOrderNumAndIsSuccess(String orderNum, int success) {
		return orderPriceDetailMapper.deleteByOrderNumAndIsSuccess(orderNum, success);
	}

	@Override
	public int updateByOrderNumSelective(OrderPriceDetail record) {
		return orderPriceDetailMapper.updateByOrderNumSelective(record);
	}

	@Override
	public OrderPriceDetail selectByOrderNum(String orderNum) {
		return orderPriceDetailMapper.selectByOrderNum(orderNum);
	}
	
}
